function FilterNumeric(tb, KeyEvent)
{
    var nCharCode = 0;
	
	if(typeof(KeyEvent.which) != 'undefined')
			nCharCode = KeyEvent.which;
	else if (typeof(KeyEvent.keyCode) != 'undefined')
			nCharCode = KeyEvent.keyCode;
			
	switch (nCharCode){
		case 0:
		case 8:
		case 9:
		case 13:
		case 44: 
					return true;
					break;
		case 46:
					if(typeof(KeyEvent.which) != 'undefined'){
					
							tb.value += ",";
						return false;
					}
					else if (typeof(KeyEvent.keyCode) != 'undefined'){
							KeyEvent.keyCode = 44;
							return true;
						}
						break;
		default:
		
					if(nCharCode > 57 || nCharCode < 48)
							return false;
					else
							return true;
					break;
	}
}
